package com.example.demo.mapper;

import com.example.demo.entity.Shift;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Date;
import java.util.List;

@Mapper
@Repository
public interface ShiftMapper {

    int insertShift(@Param("storeId") int storeId, @Param("staffId") int staffId, @Param("workDate") Date workDate,
                    @Param("shiftScheduling") String shiftScheduling);


    List<Shift> selectShiftAll();

    List<Shift> selectAllByStoreId(@Param("storeId") Integer storeId);

    List<Shift> selectByWorkDateAndStoreId(@Param("storeId")Integer storeId,@Param("workDate")Date workDate);

    void insertAll(List<Shift> shiftList);

    int updateAll(List<Shift> shiftList);

    int updateStaffScheduling(@Param("staff_id") Integer staff_id, @Param("store_id")Integer store_id
            , @Param("staff_scheduling")String staff_scheduling, @Param("work_date") java.sql.Date work_date);

    int updateStaffSchedulingByAllZone(@Param("staff_id") Integer staff_id, @Param("store_id")Integer store_id
            , @Param("staff_scheduling")String staff_scheduling, @Param("work_date") java.sql.Date work_date);


}
